﻿using System;

namespace Neudesic.Pulse.Entities
{

    /// <summary>
    /// Exception type with details about failures occuring in the Pulse client framework.
    /// </summary>
    [Serializable]
    public class RestClientException : Exception
    {

        /// <summary>
        /// Gets or sets the status code.
        /// </summary>
        /// <value>The status code.</value>
        public int StatusCode { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="RestClientException" /> class.
        /// </summary>
        public RestClientException()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="RestClientException" /> class.
        /// </summary>
        /// <param name="message">The message.</param>
        public RestClientException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="RestClientException" /> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="inner">The inner.</param>
        public RestClientException(string message, Exception inner)
            : base(message, inner)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="RestClientException" /> class.
        /// </summary>
        /// <param name="info">The info.</param>
        /// <param name="context">The context.</param>
        protected RestClientException(
            System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        { }

    }

}
